﻿<%@ Page Title="" Language="C#" MasterPageFile="~/UserActivity/UserActivityTemlates.Master" AutoEventWireup="true" CodeBehind="ISAdd.aspx.cs" Inherits="WebApplication.UserActivity.ISAdd" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

<script type="text/javascript">
    //Delete form()
    function DeleteThis(th) {

        self = $(th);
        $("#" + id).find(".addimg").show();
        self.parents(".activediv").remove();

    }

    //add function
    function AddFormModel(type) {
        //item
        var str1 = "<div class=\"activediv\"><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">";
		str1 += "<tbody><tr><td width=\"20\" valign=\"bottom\"><p>&nbsp;</p>";
        str1 += "<img src=\"../Media/Css/images/add-green.png\" class=\"upimg addimg\" onclick='AddFormModel(\"IS\")' />";
        str1 += "<img src=\"../Media/Css/images/delete-green.png\" onclick='DeleteThis(this)' /></td>";
        str1 += "<td valign=\"top\"><p>&nbsp;</p><p class=\"upinput\">Rec'd Date</p>";
		str1 += "<select class=\"select100\"><option>01 Mar 2011</option></select></td>";
		str1 += "<td><p>&nbsp;</p><p class=\"upinput\">Package</p>";
		str1 += "<input class=\"input300\" type=\"text\"></td>";
		str1 += "<td><p>&nbsp;</p><p class=\"upinput\">Qty</p><input type=\"text\" class=\"input20\"></td>";
		str1 += "<td><p>&nbsp;</p><table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" class=\"all-pr-table\">";
        str1 += "<tr><td><p class=\"upinput\">Currency</p><select class=\"select60\"><option>Euro</option></select></td>";
        str1 += "<td><p class=\"upinput\">Unit Cost</p><input type=\"text\" class=\"input60\"></td>";
        str1 += "</tr></table></td><td><p>&nbsp;</p><p class=\"upinput\">Sub-total</p>";
		str1 += "<span>Euro 400.00</span></td><td><p class=\"mdd-s\">Surcharge</p>";
		str1 += "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" class=\"all-pr-table\"><tr>";
        str1 += "<td><p class=\"upinput\">Currency</p><select class=\"sl2\"><option>Euro</option></select></td>";
        str1 += "<td><p class=\"upinput\">$</p><input type=\"text\" class=\"input20\"></td>";
        str1 += "<td><p class=\"upinput\">%</p><input type=\"text\" class=\"input20\"></td>";
        str1 += "</tr></table></td><td><p class=\"mdd-d\">Discount</p>";
		str1 += "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" class=\"all-pr-table\">";
        str1 += "<tr><td><p class=\"upinput\">Currency</p><select class=\"sl2\"><option>Euro</option></select></td>";
        str1 += "<td><p class=\"upinput\">$</p><input type=\"text\" class=\"input20\"></td>";
        str1 += "<td><p class=\"upinput\">%</p><input type=\"text\" class=\"input20\"></td>";
        str1 += "</tr></table></td></tr></tbody></table></div>";
  





        str = "";
        id = "";
        switch (type) {
            case "IS":
                str = str1;
                id = "IService";
                break;

        }

        var msg = "最多可以放5個!";
        var len = $("#" + id).find(".activediv").size();
        if (len < 5) {
            $("#" + id).append(str);
            if (len < 4)
                $("#" + id).find(".addimg").show();
            else
                $("#" + id).find(".addimg").hide();
        }
        else {
            $("#" + id).prev(".addimg").hide();
            alert(msg)
        }
    }
</script>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
  <div class="content-title">
    <h1>Activity > Export Marketing > Activity Record</h1>
  </div> 
  <div class="con-nav">
    <a href="#" class="btn"><span class="ui-icon ui-icon-newwin"></span>Add New Record</a>
  </div>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
  <div class="partWrap">
   
    <h2 class="ttpl pdbm">Add Interpretation Service</h2>
    <div class="clear5"></div>
    <h5 class="ttpl">Interpretation Service</h5>
       <table cellpadding="0" cellspacing="0" border="0" width="100%">
		 <tbody>
		  <tr> 
		   <td id="IService" colspan="2">
            <div class="activediv">
              <table cellpadding="0" cellspacing="0" border="0" width="100%">
		        <tbody>
		        <tr>
                  <td width="20" valign="top">
                   <p>&nbsp;</p>
                    <p class="upinput">&nbsp;</p>
                    <img src="../Media/Css/images/add-green.png" class="upimg addimg" onclick='AddFormModel("IS")' />
                  </td>
		          <td valign="top">
		            <p>&nbsp;</p>
		            <p class="upinput">Rec'd Date</p>
		            <select class="select100"><option>01 Mar 2011</option></select>
		          </td>
		          <td>
		            <p>&nbsp;</p>
		            <p class="upinput">Package</p>
		            <input class="input300" type="text" value="On-site interpretation service (4 ways)">
		          </td>
		          <td>
		            <p>&nbsp;</p>
		            <p class="upinput">Qty</p>
		            <input type="text" class="input20" value="1">
		          </td>
		          <td>
		            <p>&nbsp;</p>
		            <table cellspacing="0" cellpadding="0" border="0" class="all-pr-table">
                     <tr>
                      <td><p class="upinput">Currency</p><select class="select60"><option>Euro</option></select></td>
                      <td><p class="upinput">Unit Cost</p><input type="text" class="input60" value="400.00"></td>
                     </tr>
                    </table>
		          </td>
		          <td>
		            <p>&nbsp;</p>
		            <p class="upinput">Sub-total</p>
		            <span>Euro 400.00</span>
		          </td>
		          <td>
			        <p class="mdd-s">Surcharge</p>
			        <table cellspacing="0" cellpadding="0" border="0" class="all-pr-table">
                     <tr>
                      <td><p class="upinput">Currency</p><select class="sl2"><option>Euro</option></select></td>
                      <td><p class="upinput">$</p><input type="text" class="input20"></td>
                      <td><p class="upinput">%</p><input type="text" class="input20"></td>
                     </tr>
                    </table>
		          </td>
		          <td>
			        <p class="mdd-d">Discount</p>
			        <table cellspacing="0" cellpadding="0" border="0" class="all-pr-table">
                     <tr>
                      <td><p class="upinput">Currency</p><select class="sl2"><option>Euro</option></select></td>
                      <td><p class="upinput">$</p><input type="text" class="input20"></td>
                      <td><p class="upinput">%</p><input type="text" class="input20"></td>
                     </tr>
                    </table>
		          </td>
		        </tr>
		        </tbody>
		      </table>
            </div>
           </td>
          </tr>
          <tr>
            <td width="20">&nbsp;</td>
            <td><p class="upinput">&nbsp;</p><textarea class="textarea800">Remark</textarea></td>
          </tr>
		  <tr>
		    <td width="20">&nbsp;</td>
		    <td align"right">
		    <table>
			<tr>
			<td>Sub Total:</td><td>Euro</td><td>400.00</td>
			</tr>
		    </table>
		    </td>
		 </tr>
         </tbody>
        </table>

   </div>
</asp:Content>
